<template>
  <div class="grand-child">
    <h3>孙组件</h3>
    <h4>a:{{ a }} 因为子拿了所以孙拿不到了</h4>
    <h4>b:{{ b }}</h4>
    <h4>其他:{{ $attrs }}</h4>
    <button @click="updateA(6)">点我把爷爷那里的a更新</button>
  </div>
</template>

<script setup lang="ts">
defineProps(["a", "b", "updateA"]);
</script>

<style scoped>
.grand-child {
  background: rgb(141, 147, 240);
  padding: 10px;
  box-shadow: 0 0 10px black;
  border-radius: 10px;
}
</style>
